source = '''    qint64 groupCode;
    qint64 dwGroupInfoSeq;
    qint64 dwGroupFlagExt;
    qint64 dwGroupRankSeq;'''
line = source.replace("    ","").replace(";","").split("\n")
ret = ""

#write<short>(1,iVersion);
index = -1
for item in line:
    elem = item.split(" ")
    index = index + 1
    ret += "    writeT<"+elem[0]+">("+str(index)+","+elem[1]+");\n"

print(ret)
